
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
// import loginPage from  '../pages/loginPage/loginPage.vue'
// import pageIndex from '../pages/index/index.vue'
// import partNews from '../pages/partNews/partNews.vue'
// import activity from '../pages/activity/index.vue'
// import assessment from '../pages/userRank/userRank.vue'
// import cloudExhibition from '../pages/cloudExhibition/cloudExhibition.vue'
// import ffcl from '../pages/ffcl/ffcl.vue'
// import heart from '../pages/heart/heart.vue'
// import onLineExam from '../pages/onLineExam/onLineExam.vue'
// import partAlbum from '../pages/partAlbum/partAlbum.vue'
// import partScholl from '../pages/partScholl/partScholl.vue'
// import supervise from '../pages/supervise/supervise.vue'
// import reportItem from '../pages/reportItem/reportItem.vue'
// import login from '../pages/login/login.vue'
// import regeister from '../pages/regeisterPage/regeisterPage.vue'
// import notFound from '../pages/notFound/404.vue'
// import partIndex from '../pages/partIndex/partIndex'
// import partcourse from '../pages/partcourse/partcourse.vue'
// import mine from '../pages/mine/mine.vue'
// import reportForm from '../pages/reportForm/reportForm.vue'
// import reportSubmit from '../pages/reportSubmit/reportSubmit.vue'
// import userCenter from '../pages/userCenter/userCenter.vue'
// import userInfo from '../components/userInfo.vue'
// import notice from '../pages/notice/notice.vue'
// import advice from '../components/advice.vue'
// import editorUser from '../components/editorUser.vue'
// import about from '../components/about.vue'
// import aboutCompany from '../components/aboutCompany.vue'
// import editor from '../components/editor.vue'
// import article from '../pages/article/article.vue'
// import videoList from '../pages/videoList/videoList.vue'
// import selectCourse from '../pages/selectCourse/selectCourse.vue'
// import activeDetail from '../pages/activeDetail/activeDetail.vue'
// import contribute from '../pages/contribute/contribute.vue'
// import albumDetail from '../pages/albumDetail/albumDetail.vue'
// import userScore from '../pages/userScore/userScore.vue'
// import resetPassword from '../pages/resetPassword/index.vue'
// import heartList from '../pages/notice/heart.vue'
// import newsNotice from '../pages/newsNotice/index.vue'
// import store from '../pages/store/store.vue'

const pageIndex = () => import('@/pages/index/index.vue')
export default new Router({
  routes: [
    {
      path: '/',
      name:'pageIndex',
      component: pageIndex
    },
    {
      path:'/loginPage',
      name:'loginPage',
      component: resolve => require(['@/pages/loginPage/loginPage.vue'], resolve),
      },
      {
        path:'/partNews',
        name:'partNews',
        component: resolve => require(['@/pages/partNews/partNews.vue'], resolve),
      },
      {
        path:'/selectCourse',
        name:'selectCourse',
        component: resolve => require(['@/pages/selectCourse/selectCourse.vue'], resolve),
      },
    {
      path:'/resetPassword',
      name:'resetPassword',
      component: resolve => require(['@/pages/resetPassword/index.vue'], resolve),
    },
    {
      path:'/userScore',
      name:'userScore',
      component: resolve => require(['@/pages/userScore/userScore.vue'], resolve),
    },
    {
      path:'/albumDetail',
      name:'albumDetail',
      component: resolve => require(['@/pages/albumDetail/albumDetail.vue'], resolve),
    },
    {
      path:'/contribute',
      name:'contribute',
      component: resolve => require(['@/pages/contribute/contribute.vue'], resolve),
    },
    {
      path:'/activeDetail',
      name:'activeDetail',
      component: resolve => require(['@/pages/activeDetail/activeDetail.vue'], resolve),
    },
    {
      path:'/activity',
      name:'activity',
      component: resolve => require(['@/pages/activity/index.vue'], resolve),
      meta: {
          requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
        },
    },
    {
      path:'/assessment',
      name:'assessment',
      component: resolve => require(['@/pages/userRank/userRank.vue'], resolve),
      meta: {
        requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
      },
    },
    {
      path:'/cloudExhibition',
      name:'cloudExhibition',
      component: resolve => require(['@/pages/cloudExhibition/cloudExhibition.vue'], resolve),
    },
    {
      path:'/ffcl',
      name:'ffcl',
      component: resolve => require(['@/pages/ffcl/ffcl.vue'], resolve),
    },
    {
      path:'/heartList',
      name:'heartList',
      component: resolve => require(['@/pages/notice/heart.vue'], resolve),
    },

    {
        path:'/heart',
        name:'heart',
         component: resolve => require(['@/pages/heart/heart.vue'], resolve),
      },
     ,{
        path:'/onLineExam',
        name:'onLineExam',
        component: resolve => require(['@/pages/onLineExam/onLineExam.vue'], resolve),
      },
    {
        path:'/partAlbum',
        name:'partAlbum',
        component: resolve => require(['@/pages/partAlbum/partAlbum.vue'], resolve),
      },
      {
            path:'/partScholl',
            name:'partScholl',
            component:resolve => require(['@/pages/partScholl/partScholl.vue'], resolve),
            redirect:'/partScholl/index',
            meta: {
              requireAuth: true,
            },
          children:[
            {
              path:'index',
              name:'partIndex',
              component:resolve => require(['@/pages/partIndex/partIndex.vue'], resolve),
              meta: {
                requireAuth: true
              },
            },
            {
              path:'partcourse',
              name:'partcourse',
              component:resolve => require(['@/pages/partcourse/partcourse.vue'], resolve),
              meta: {
                requireAuth: true
              },
            },
            {
              path:'mine',
              name:'mine',
              component:resolve => require(['@/pages/mine/mine.vue'], resolve),
              meta: {
                requireAuth: true
              },
            },
            {
              path:'',
              redirect:'/partScholl/index'
            }
          ]
        },
      {
        path:'/supervise',
        name:'supervise',
       component:resolve => require(['@/pages/supervise/supervise.vue'], resolve),
      },
      { path:'/videoList',
        name:'videoList',
        component:resolve => require(['@/pages/videoList/videoList.vue'], resolve),
        meta: {
          requireAuth: true
        },
      },
      {
        path:'/reportItem',
        name:'reportItem',
        component:resolve => require(['@/pages/reportItem/reportItem.vue'], resolve),
      },
      {
        path:'/reportForm',
        name:'reportForm',
        component:resolve => require(['@/pages/reportForm/reportForm.vue'], resolve),
      },

      {
        path:'/regeister',
        name:'regeister',
        component:resolve => require(['@/pages/regeisterPage/regeisterPage.vue'], resolve),
      },
{
        path:'/reportSubmit',
        name:'reportSubmit',
        component:resolve => require(['@/pages/reportSubmit/reportSubmit.vue'], resolve),
      }
      ,{
        path:'/userCenter',
        name:'userCenter',
        component:resolve => require(['@/pages/userCenter/userCenter.vue'], resolve),
        meta: {
          requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
        },
      },
      {
        path:'/newsNotice',
        name:'newsNotice',
        component:resolve => require(['@/pages/newsNotice/index.vue'], resolve),
      },
      {
        path:'/userInfo',
        name:'userInfo',
        component:resolve => require(['@/components/userInfo.vue'], resolve),
      },
      {
        path:'/notice',
        name:'notice',
        component:resolve => require(['@/pages/notice/notice.vue'], resolve),
      },
      {
        path:'/advice',
        name:'advice',
        component:resolve => require(['@/components/advice.vue'], resolve),
      },
      {
        path:'/about',
        name:'about',
        component:resolve => require(['@/components/about.vue'], resolve),
      },
      {
        path:'/aboutCompany',
        name:'aboutCompany',
        component:resolve => require(['@/components/aboutCompany.vue'], resolve),
      },
      {
        path:'/editorUser',
        name:'editorUser',
        component:resolve => require(['@/components/editorUser.vue'], resolve),
      },
      {
        path:'/editor',
        name:'editor',
        component:resolve => require(['@/components/editor.vue'], resolve),
      },
      {
        path:'/article',
        name:'article',
        component:resolve => require(['@/pages/article/article.vue'], resolve),
      },
      {
        path:'/store',
        name:'store',
        component:resolve => require(['@/pages/store/store.vue'], resolve),
      },{
        path: "*",
        component:resolve => require(['@/pages/notFound/404.vue'], resolve)
    }
  ]
})

